<?php
	$Debug_tend = microtime(true);
	$tempo_processamento = round(($Debug_tend - $Debug_tstart)*1000, 2);
	$Debug_mend = memory_get_usage(TRUE);
	$memoria_usada_b = $Debug_mend - $Debug_mstart;
	$memoria_usada_Kb = $memoria_usada_b / 1024;
	$memoria_usada_Mb = $memoria_usada_Kb / 1024;
	$memoria_maxima = memory_get_peak_usage();
	
	echo "<DIV style='margin-top: 20px; color: #000000; text-align: center; font-size: 13px;'>";
	echo "<FONT style='color: #FF0000'><STRONG>Nebulae Benchmarking:</STRONG></FONT><BR /><BR />";
	echo "<hr />";
	echo "<font color='blue'><h2> PHP </h2></font>";
	echo "PHP versao: " . phpversion() . " <BR />";
	echo "Zend versao: " . zend_version() . " <BR />";
	foreach(get_loaded_extensions() as $xtensao)
	{
		echo "PHP extensão carregada $xtensao <BR />";
	}
	echo "PHP processado em $tempo_processamento ms <BR />";
	echo "PHP usou $memoria_usada_b Bytes <BR />";
	echo "PHP usou $memoria_usada_Kb KBytes <BR />";
	echo "PHP usou $memoria_usada_Mb MBytes <BR />";
	echo "Pico de Memoria: $memoria_maxima Bytes <BR /><BR />";
	echo "<hr />";
	echo "<font color='blue'><h2> SQL </h2></font>";
	echo "MYSQL SERVER INFO: " . MYSQL_SERVER_INFO . "<BR />";
	echo "MYSQL CLIENT INFO: " . MYSQL_CLIENT_INFO . "<BR />";
	echo "MYSQL HOST INFO: " . MYSQL_HOST_INFO . "<BR />";
	echo "MYSQL PROTO INFO: " . MYSQL_PROTO_INFO . "<BR />";
	echo "MYSQL INFO: " . MYSQL_INFO . "<BR />";
	echo "MYSQL STATUS: " . MYSQL_STATUS . "<BR />";
	echo "MYSQL ADVANCED STATUS: " . MYSQL_ADVANCED_STATUS . "<BR /><BR />";
	
	
	$my_included = get_included_files();
	echo "PHP <STRONG>incluiu</STRONG> " . count($my_included) . " ficheiros:<BR />";
	
	foreach( $my_included as $x_included )
	{
		echo $x_included . "<BR />";
	}
	echo "</DIV>";
?>